gdk: Emulate motion events when requested
authorMatthias Clasen <mclasen@redhat.com>
Sat, 3 Mar 2012 04:33:16 +0000 (23:33 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 3 Mar 2012 04:33:16 +0000 (23:33 -0500)
GtkRange was using GDK_POINTER_MOTION_MASK, and it was not
getting any emulated motion events, because we only translate
from GDK_BUTTON_MOTION_MASK to GDK_POINTER_MOTION_MASK, but not
the other way around, and emulated_mask only had
GDK_BUTTON_MOTION_MASK in it. Now we put GDK_POINTER_MOTION_MASK
in emulated_mask and successfully match for windows that
have GDK_POINTER_MOTION_MASK or any of the button motion masks
selected.

This fixes range sliders not following the finger and jumping
to the last position upon release.

gdk/gdkwindow.c

index 33887526c6d332f1883d936f8698baf827ce79c8..9a053b88f0dbf8ad779ddde64669cad58d2ab267 100644 (file)
@@ -9158,7 +9158,7 @@ get_event_window (GdkDisplay                 *display,
           emulated_mask |= GDK_BUTTON_PRESS_MASK;
           break;
         case GDK_TOUCH_UPDATE:
-          emulated_mask |= GDK_BUTTON_MOTION_MASK;
+          emulated_mask |= GDK_POINTER_MOTION_MASK;
           break;
         case GDK_TOUCH_END:
           emulated_mask |= GDK_BUTTON_RELEASE_MASK;